#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
int main(int argc, char const *argv[])
{
    int fd = open("./tmp/re3.txt",O_WRONLY | O_CREAT);
    char* str = "Hello World!";
    int number = write(fd,str,strlen(str));
    char* str2 = (char*)malloc(1024);
    sprintf(str2,"I have written %d char",number);
    write(STDOUT_FILENO,str2,strlen(str2));
    close(fd);
    return 0;
}
